From c9ee7a756b46ce7092829e5574d52e2d1f3f4ab7 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 1 Dec 2009 13:39:51 +0000 Subject: [PATCH] Revert 20523:bd52fff29e6e "Remove redundant tests in __start_xen()" Consensus is that code is clearer with the tests, even though they are redundant. Signed-off-by: Keir Fraser --- xen/arch/x86/setup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 7615546cc3..98249807bc 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -758,7 +758,7 @@ void __init __start_xen(unsigned long mbi_p) #endif /* Is the region suitable for relocating the multiboot modules? */ - if ( !initial_images_start && + if ( !initial_images_start && (s < e) && ((e-s) >= (modules_length+modules_headroom)) ) { initial_images_end = e; @@ -776,7 +776,8 @@ void __init __start_xen(unsigned long mbi_p) } } - if ( !kexec_crash_area.start && ((e-s) >= kexec_crash_area.size) ) + if ( !kexec_crash_area.start && (s < e) && + ((e-s) >= kexec_crash_area.size) ) { e = (e - kexec_crash_area.size) & PAGE_MASK; kexec_crash_area.start = e; -- 2.30.2